<!--
 * @Author: your name
 * @Date: 2021-08-10 16:16:16
 * @LastEditTime: 2021-08-10 19:31:22
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briupf:\Web课后练习成果\HTML\精灵图.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>精灵图作业</title>
    <style>
        body div>div {
            width: 100px;
            height: 150px;
            padding-left: 50px;
            background-image: url(./image/sprites.jpg);
        }
        body div>:nth-child(1) {
            background-position: -120px -130px;
        }
        body div>:nth-child(2) {
            background-position: -120px -300px;
        } 
        body div>:nth-child(3) {
            background-position: -120px -475px;
        } 
        body div>:nth-child(4) {
            background-position: -120px -650px;
        }
    </style>
</head>
<body>
    <div>
        <div>四叶草</div>
        <div>皇冠</div>
        <div>脚印</div>
        <div>蝴蝶结</div>
    </div>
</body>
</html>